package com.bootdo.company.controller;

import com.bootdo.system.domain.MenuDO;
import com.bootdo.system.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;

import java.util.HashMap;
import java.util.List;

public class IndexBaseController {

    @Autowired
    MenuService menuService;

    public void getHeadMenu(Model model){
        List<MenuDO> menuTree = menuService.getTreeByMenuType(2L);
        model.addAttribute("menuTree",menuTree);
    }

    public List<MenuDO> getJJList(Model model) {
        HashMap<String,Object> dataParam = new HashMap<String, Object>();
        dataParam.put("parentId",110L);//解决方案
        return menuService.list(dataParam);

    }

}
